package com.licode.utils.unilite.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * 时间工具类
 *
 * @author licode
 * @version 1.0
 * @date 2018-05-01 16:09
 */
public class UTimeUtil {
    public static long currSeconds() {
        return System.currentTimeMillis() / 1000;
    }

    public static String currFull() {
        return LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
    }

    public static String currYmd() {
        return LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
    }
}
